Telegram Group & Telegram Channel
🧠 RegExp: Как найти строки с IP-адресами в логах

Частая задача — выцепить IP-адреса из логов. Вот регулярка и однострочник, которые помогут:


grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' /var/log/nginx/access.log


📌 Что делает:
- -Eo — включаем расширенные регулярки и выводим только совпадения
- ([0-9]{1,3}\.){3}[0-9]{1,3} — шаблон для IPv4-адресов

💡 Можно дополнительно убрать дубликаты и отсортировать по частоте:


grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' /var/log/nginx/access.log | sort | uniq -c | sort -nr | head


🚀 Покажет топ IP-адресов по количеству обращений — удобно для анализа трафика и выявления подозрительной активности.



tg-me.com/pro_python_code/1799
Create:
Last Update:

🧠 RegExp: Как найти строки с IP-адресами в логах

Частая задача — выцепить IP-адреса из логов. Вот регулярка и однострочник, которые помогут:


grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' /var/log/nginx/access.log


📌 Что делает:
- -Eo — включаем расширенные регулярки и выводим только совпадения
- ([0-9]{1,3}\.){3}[0-9]{1,3} — шаблон для IPv4-адресов

💡 Можно дополнительно убрать дубликаты и отсортировать по частоте:


grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' /var/log/nginx/access.log | sort | uniq -c | sort -nr | head


🚀 Покажет топ IP-адресов по количеству обращений — удобно для анализа трафика и выявления подозрительной активности.

BY Python RU




Share with your friend now:
tg-me.com/pro_python_code/1799

View MORE
Open in Telegram


Python RU Telegram | DID YOU KNOW?

Date: |

What is Telegram?

Telegram’s stand out feature is its encryption scheme that keeps messages and media secure in transit. The scheme is known as MTProto and is based on 256-bit AES encryption, RSA encryption, and Diffie-Hellman key exchange. The result of this complicated and technical-sounding jargon? A messaging service that claims to keep your data safe.Why do we say claims? When dealing with security, you always want to leave room for scrutiny, and a few cryptography experts have criticized the system. Overall, any level of encryption is better than none, but a level of discretion should always be observed with any online connected system, even Telegram.

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

Python RU from kr


Telegram Python RU
FROM USA